//
//  YCLoginManager.h
//  HeartWorldClient
//
//  Created by 董知樾 on 2017/7/13.
//  Copyright © 2017年 谭明权. All rights reserved.
//

#import <Foundation/Foundation.h>

//temp
typedef void(^YCLoginManagerVerifyBlock)(BOOL success, NSString *message);
typedef void(^YCLoginManagerLoginSuccessBlock)(NSString *memberId);
typedef void(^YCLoginManagerLoginFailureBlock)(NSString *message);

@interface YCLoginManager : NSObject

@property (nonatomic, copy) NSString *phoneNumber;
@property (nonatomic, copy) NSString *getBackPhoneNumber;


+ (instancetype)shareManager;

- (void)getVerifyCode:(YCLoginManagerVerifyBlock)complete;
- (void)getVoiceVerifyCode:(YCLoginManagerVerifyBlock)complete;

///参数：member_mobile phone_code yw_id phone_id lat_point lng_point
- (void)verifyCodeLoginWithCode:(NSString *)code success:(YCLoginManagerLoginSuccessBlock)success failure:(YCLoginManagerLoginFailureBlock)failure;

///参数：member_mobile member_pwd yw_id
- (void)accountPasswordLoginWithPassword:(NSString *)password success:(YCLoginManagerLoginSuccessBlock)success failure:(YCLoginManagerLoginFailureBlock)failure;

///验证码验证 参数：member_mobile phone_code
- (void)verifyCodeVerifyWithCode:(NSString *)code complete:(YCLoginManagerVerifyBlock)complete;

///重置密码 参数 member_mobile member_pwd
- (void)resetPassword:(id)password complete:(YCLoginManagerVerifyBlock)complete;

//患者端账号是否存在 参数：member_mobile
- (void)accountIsExistPhoneNumber:(NSString *)phoneNumber complete :(YCLoginManagerVerifyBlock)complete;
/**
 登录成功后的操作
 
 @param memberId memberId
 */
- (void)loginSuccessConfigMemberId:(NSString *)memberId;

@end
